package com.woniuxy.happylife.datastore.dao;

import com.woniuxy.happylife.entity.ActivityRelease;
import com.woniuxy.happylife.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动数据dao
 */
@Mapper
public interface ActivityReleaseDao {

    /**
     * 存储活动数据
     * @param activityRelease
     * @return
     */
    public int addActivity(@Param("ar") ActivityRelease activityRelease);

    /**
     * 活动审核
     * @param activityRelease
     * @return
     */
    public int reviewActivity(@Param("ar") ActivityRelease activityRelease);

    /**
     * 查询活动
     * @param activityRelease
     * @return
     */
    public List<ActivityRelease> findRelease(@Param("ar") ActivityRelease activityRelease);

    /**
     * 查询发布用户
     * @param id
     * @return
     */
    public User releaseUser(Integer id);

    /**
     * 查询审核用户
     * @param id
     * @return
     */
    public User reviewUser(Integer id);


}
